tools: ocaml: autogenerate xl datatype definitions and ocaml<->C conversion
authorIan Campbell <ian.campbell@citrix.com>
Wed, 20 Apr 2011 16:13:08 +0000 (17:13 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 20 Apr 2011 16:13:08 +0000 (17:13 +0100)
commit1d7b94fcb6f4ff0f8d2c6836963baace22bd0fde
tree444527b073bc22e72cf134b08450f729b6edb35b
parente6f1957781e6075ef2a84306040fe7ca135acb77
tools: ocaml: autogenerate xl datatype definitions and ocaml<->C conversion

The method by which ocaml converts between ocaml types and C
datastructures is based around explicit matching of field indexes
within the ocaml data type to C structure members which is error prone
to write and fragile to maintain (as evidenced by the difference
between the existing hand coded support and the autogenerated code
which shows how out of date the ocaml bindings have
become). Autogenerating these types should reduce these problems.

There is a short list of types which are blacklisted and not
autogenerated because I expect them to change significantly in the
future due to changes to the IDL type (fixing up the TaggedUnion
class) so I didn't want to spend the time to implement the necessary
autogenerator features just yet..

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/ocaml/libs/xl/Makefile
tools/ocaml/libs/xl/genwrap.py
tools/ocaml/libs/xl/xl.ml.in
tools/ocaml/libs/xl/xl.mli.in
tools/ocaml/libs/xl/xl_stubs.c